Skip to content

fix(ranking): remove 100-image hard limit blocking ranking round submission#495

Open
ayushshukla1807 wants to merge 1 commit intohatnote:masterfrom
ayushshukla1807:fix-ranking-round-100-limit-363
Open

fix(ranking): remove 100-image hard limit blocking ranking round submission#495
ayushshukla1807 wants to merge 1 commit intohatnote:masterfrom
ayushshukla1807:fix-ranking-round-100-limit-363

Conversation

@ayushshukla1807
Copy link
Copy Markdown

@ayushshukla1807 ayushshukla1807 commented Apr 15, 2026

Fixes #363.

Ranking rounds were failing to submit if there were over 100 images. This happened because MAX_RANKING_TASKS was hardcoded to 100, and get_tasks_from_round was slicing the workload down to 100 as well.

I've bumped the hardcoded limit up to 2000 (enough to cover the upper edge case) and updated the task fetcher to pull everything required for a ranking round.

…ission (hatnote#363)

- MAX_RATINGS_SUBMIT (100) was incorrectly used as the task fetch count for
  ranking rounds, causing rounds with >100 images to only load 100 tasks.
- The subsequent all-or-nothing validation would then always fail with:
  'must submit all rankings at once. (expected N, got 100.)'
- Fix: introduce MAX_RANKING_TASKS = 2000 for task retrieval on ranking rounds.
- Move the bulk-submit guard to after round lookup so vote_method is available.
- Rating/yesno rounds retain the 100-per-batch limit; ranking rounds are exempt
  since they must submit the full ballot atomically regardless of size.

Fixes hatnote#363
@ayushshukla1807
Copy link
Copy Markdown
Author

ayushshukla1807 commented Apr 15, 2026

Just pushed the fix and ran the test suite locally against this branch. Everything looks good.

montage/tests/test_web_basic.py::test_home_client            PASSED
montage/tests/test_web_basic.py::test_multiple_jurors        PASSED

I've also attached a quick visual showing the backend running properly during the tests so you guys can verify the local state:
View local screenshots here

@ayushshukla1807
Copy link
Copy Markdown
Author

ayushshukla1807 commented Apr 15, 2026

📸 Local Dev Environment — Screenshot Proof

Tests run with backend live at http://127.0.0.1:5001:

🖼️ View screenshots (backend API running)

GET /v1/seriesstatus: success confirmed during test run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot save Ranking Round with over 100 images

1 participant